<%-- 
    Document   : featured_product
    Created on : Nov 27, 2011, 4:41:37 PM
    Author     : Ngoc Linh
--%>

<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>

<div class="main_content_panel" id="featured_product">
    <p class="top_main_content_panel">
        Phiên đấu giá nổi bật
    </p>
    <div class="content_main_content_panel">
        <a class="previous_nav" id="btn_pre_f">
            <img src="images/btn_pre.png" alt="" />
        </a> 
        <a class="next_nav" id="btn_next_f">
            <img src="images/btn_next.png" alt="" />
        </a>
        <div class="list_products" id="new_product">
            <c:if test="${not empty requestScope.sanphamnoibat}">
                <ul>
                    <c:forEach items="${requestScope.sanphamnoibat}" var="sp">
                        <li>
                            <div class="product_item">
                                <c:url value="product.do" var="linkDetailPro">
                                    <c:param name="masp" value="${sp.maSanPham}"></c:param>
                                </c:url>
                                <p class="name_product">    
                                    <a href="${linkDetailPro}" title="Xem chi tiết">
                                        ${sp.tenSanPham}
                                    </a>                                
                                </p>
                                <p class="image_product">
                                    <a href="${linkDetailPro}" title="Xem chi tiết">
                                        <img src="${sp.hinhMoTa}" alt="${sp.tenSanPham}" width="110px" height="110px" />
                                    </a>
                                </p>
                                <div class="info_product">
                                    <p class="timedown_product" id="countdown_${sp.maSanPham}_f">
                                        
                                    </p>
                                    <p class="timeend_product">
                                        <fmt:formatDate value="${sp.ngayHetHan}" pattern="dd/MM/yyyy HH:mm:ss"></fmt:formatDate>
                                    </p>
                                    <p class="price_product">
                                        <fmt:formatNumber pattern="###,###" value="${sp.giaHienTai}"></fmt:formatNumber><span>đ</span>
                                    </p>
                                </div>                                
                                <p class="datgia">
                                    <a href="${linkDetailPro}"> <img src="images/btn_datgia.png" alt="Đặt giá" /></a>
                                </p>
                                <fmt:formatDate pattern="MM/dd/yyyy HH:mm:ss" value="${sp.ngayHetHan}" var="dateEnd"></fmt:formatDate>
                                <script type="text/javascript"> 
                                    GetCount(new Date('${dateEnd}'), 'countdown_${sp.maSanPham}_f' );
                                </script>
                            </div>
                        </li>
                    </c:forEach>                    
                </ul>
            </c:if>            
        </div>
    </div>
</div>